<?php
include_once('../bootstrap.php');
$ids = explode('-', $_POST['ids']);
for ($i=0; $i<count($ids); $i++) {
    if ($objeto = Doctrine::getTable($_POST['tabla'])->find($ids[$i])) {
        $objeto->orden = $i;
        $objeto->save();
    }
}
?>
